package com.hitrust.gs.action;

import java.util.ArrayList;

import com.hitrust.gs.business.GSProviderProcessor;
import com.hitrust.gs.lib.GSBaseConstants;
import com.hitrust.gs.service.GSBaseAction;
import com.hitrust.gs.service.GSBaseForm;
import com.hitrust.gs.service.GSBaseManager;

/**
 * 进入供应商浏览首页面
 */
public class GSProviderScanActionForSearch extends GSBaseAction {

    public String execute(GSBaseForm aForm) throws Exception {
        //取得所有国家
        ArrayList tList = GSBaseManager.getAllCountry();
        aForm.getRequest().setAttribute("country",tList);
        //取得所有省
        tList = GSBaseManager.getAllProvince();
        aForm.getRequest().setAttribute("province",tList);
        //取得所有地区
        tList = GSBaseManager.getAllDistinct();
        aForm.getRequest().setAttribute("district",tList);
        //取得公司性质
        String[][] tStr= GSBaseManager.getAllCorpProperty();
        aForm.getRequest().setAttribute("corpproperty",tStr);
      //取得最大供应商编号
        String tGSProviderID =GSBaseManager.getMaxProviderId();
        aForm.getRequest().setAttribute("MaxProviderID",tGSProviderID);
        return GSBaseConstants.FORWARD_SUCCESS;
    }
}
